<%@ page language="java" import="java.util.*,com.hs.core.utils.*,com.hs.chd.action.search.*" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head> 
<%@ include file="../../include.jsp"%> 
<script src='<%=basePath%>thirtpart/jquery/jquery.blockUI.js'></script> 
<script src='<%=basePath%>app/js/hs.search.js'></script> 
<link rel="stylesheet" type="text/css" href="<%=basePath %>thirtpart/dhtmlx25/dhtmlxlayout.css"/>
<link rel="STYLESHEET" type="text/css" href="<%=basePath %>thirtpart/dhtmlx25/dhtmlxtree.css"/>
<link rel="stylesheet" type="text/css" href="<%=basePath %>thirtpart/jquery/qtip/jquery.qtip.min.css"/>
<script src="<%=basePath %>thirtpart/dhtmlx25/dhtmlxcommon.js"></script>
<script src="<%=basePath %>thirtpart/dhtmlx25/dhtmlxlayout.js"></script> 
<script src="<%=basePath %>thirtpart/dhtmlx25/dhtmlxcontainer.js"></script>  
<script  src="<%=basePath %>thirtpart/dhtmlx25/dhtmlxtree.js"></script>  
<script  src="<%=basePath %>thirtpart/jquery/qtip/jquery.qtip-1.0.0-rc3.min.js"></script>  
<script  src="<%=basePath %>thirtpart/jquery/qtip/jquery.qtip-1.0.0-rc3.min.js"></script> 
<script  src="<%=basePath %>thirtpart/jquery-1.8.3.min.js"></script>  
<script  src="<%=basePath %>common/layer/layer.min.js"></script>  

<script src='<%=basePath%>dwr/interface/catagorydwr.js'></script> 

<style>.tac{text-align:center}

 


</style>
<script language=JavaScript> 
function datastat(){
	//var win = document.getElementById('resultlist').contentWindow;
	//var allsql = win.document.getElementById('allfullsql').value;
    //openwindow('<%=basePath%>stat/statindex.do?allsql='+encodeURI(allsql),'1280','960','');
	basiclinchuang('','','<%=basePath %>');
}
function datastatadv(){
	//var win = document.getElementById('resultlist').contentWindow;
	//var allsql = win.document.getElementById('allfullsql').value;
    //openwindow('<%=basePath%>stat/statindex.do?allsql='+encodeURI(allsql),'1280','960','');
	advlinchuang('','<%=basePath %>');
}
function enterSingledb(dbtype){
    var disstr = getAllselectedId();  
    searchform.disidstr.value = disstr;
    searchform.action = '<%=basePath %>search/singledbIndex.do?dbtype='+dbtype;
 	searchform.submit();
}


</script>
</head>
<body class="bodyBg">
<dl class="treeWrap">
    <dt>
    
      <input type="button" onclick="selectAll();" value="全选" class="btn btn-primary" />
     <input   type="button" onclick="resetAll();" class="btn btn-primary" value="清除" /></dt>
    <dd> 
       	<div id="treeboxbox_tree" style="width:95%;margin-left:10px;overflow:auto;border:0px solid #bdc0c3;">
       		 
       	</div>  
       	
       
       	 <span><font size=2 color=red><strong>请在选择要查询的病名后，点击右侧橙色“共通检索”按钮</strong></font></span> 
    </dd>
     
</dl>
<div class="cont">
	<!--检索-->
	<form action="" method="post" name="searchform">
        <div class="sear_index"> 
                	<img src="<%=imagePath %>ico_sear_b.gif" />
                	<input name="disidstr" type="hidden" id="disidstr" style="width:70%"/>
                	
                	<input name="basic_colvalue" type="text" id="basic_colvalue"  style="width:70%"/>
                    <input type="button" onclick="mutidbSearch('<%=basePath %>');" class="btn btn-primary" value="共通检索" />
          </div>
    </form><!--/检索-->
    <!--检索结果-->
     <!--检索结果-->
    <dl class="grid">
        <dt>中文期刊文献库</dt>
        <dd>
            <div class="class1" id="modchn">
            	共<strong>0</strong>条
            </div>
            <div class="classCont">
            	<p>
         中文期刊文献库提供了2008年以来国内外期刊中发表的治疗脑病的相关中文文献题录信息，内容包括标题、作者、关键词、主题词、摘要、文献类型等。可进行精确检索和模糊检索。检索途径包括有文题、作者、单位、期刊名称、主题词、关键词、文献类型及全文检索的方式进行检索；并可实现疾病名称的古今中外共通检索。
           		</p>
                <a class="comeIn" href="javaScript:enterSingledb('1');">进入</a>
            </div>
        </dd>
    </dl>
    <dl class="grid pull-right">
        <dt>英文期刊文献库</dt>
        <dd>
            <div class="class2" id="modeng">
            	共<strong>0</strong>条
            </div>
            <div class="classCont">
            	<p>
           英文期刊文献库提供了2011年以来国内外期刊中发表的治疗脑病的相关英文文献题录信息，内容包括标题、作者、关键词、主题词、摘要、文献类型等。可进行精确检索和模糊检索。检索途径包括有文题、作者、单位、期刊名称、主题词、关键词、文献类型及全文检索的方式进行检索；并可实现疾病名称的古今中外共通检索。
           		</p>
                <a class="comeIn" href="javaScript:enterSingledb('2');">进入</a>
            </div>
        </dd>
    </dl>
    <dl class="grid" style="clear:both">
        <dt>古籍数据库</dt>
        <dd>
            <div class="class3" id="oldinfo">
            	共<strong>0</strong>条
            </div>
            <div class="classCont">
            	<p>
          古籍数据库包含了从先秦时期开始的中医古代文献（例如千金翼方、普济方、本草纲目等）中治疗脑病相关诊疗、用药、论述的文本资料信息，内容包括朝代、作者、中医病名、古籍原文等，同时可进行精确检索和模糊检索。检索途径包括有书籍名称、作者、朝代、中医病名、卷号章节等以及全文检索的方式进行检索；并可实现疾病名称的古今中外共通检索。
           		</p>
                <a class="comeIn" href="javaScript:enterSingledb('3');">进入</a>
            </div>
        </dd>
    </dl>
    <dl class="grid pull-right">
        <dt>脑病综述数据库</dt>
        <dd>
            <div class="class4" id="summinfo">
            	共<strong>0</strong>条
            </div>
            <div class="classCont">
            	<p>
           脑病综述数据库包含了脑病领域专家学者对于脑病的认知和总结，内容包括疾病的基本信息，多发人群，中医相关疾病，病因病机，症状及一般体征认识，中医辨证论治，中西医结合诊疗，中医其它疗法，疾病的后期调养和康复，疾病的预防，相关资料、评论和指导方针等。根据不同用户角色，可以对数据的编辑和发布，保证了数据的时效性。
           		</p>
                <a class="comeIn" href="javaScript:enterSingledb('4');">进入</a>
            </div>
        </dd>
    </dl>
    
  <!--/检索结果-->
</div>
</body>
</html>
<script> 



var tagtype = "";
//获得所有被选中的选项
function getAllselectedId() {  
    var selectedList = tree.getAllChecked();  
    return selectedList;
    
}
//清除所有被选中的选项
function clearAllSelectedItem(){
      
	   tree.refreshItem(tagtype);
    //tree.clearSelection();
}
function submitSearch(){ 
   window.parent.searchresult.submitSearchForm();
}
function tonclick(itemId) {
     var ischeck = tree.isItemChecked(itemId) 
     if('0' == ischeck){
     	tree.setCheck(itemId,1);
     	// window.open ('<%=basePath%>app/search/synnames.jsp?id='+itemId, 'syn', 'alwaysRaised=yes,z-look=yes,height=300, width=500, top=0,left=0, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, status=no') 
     	showLayer(itemId);
     }
     if('1' == ischeck)
     	tree.setCheck(itemId,0);  
     	//loadSynnames(itemId);
     	//loadnames(itemId);

};

function showLayer(itemid){
  $.layer({ 
	type : 2,
	shade : [0],
    fix: false,
	title : ['古今中医同义词、西医同义词表',true],
	iframe : {src : '<%=basePath%>app/search/synnames.jsp?id='+itemid},
	area : ['500px' , '450px'],
	offset : ['150px', ''],
	success: function(){
		 layer.shift('left-bottom',1000); //浏览器右下角弹出
	},
	close : function(index){
 		layer.close(index);
	}
});
  
}
function tondblclick(itemId) {
         var ischeck = tree.isItemChecked(itemId);
     if('0' == ischeck){
     	tree.setCheck(itemId,1);
     	showLayer(itemId);
     	//window.open ('<%=basePath%>app/search/synnames.jsp?id='+itemId, 'syn', 'alwaysRaised=yes,z-look=yes,height=300, width=500, top=0,left=0, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, status=no') 
     	
     }
     if('1' == ischeck)
     	tree.setCheck(itemId,0); 
     	
};
function toncheck(itemId) {
       
      
};
 
function tonopen(id, mode) {
    return confirm("Do you want to " + (mode > 0 ? "close": "open") + " node " + tree.getItemText(id) + "?");
}; 

function doOnLoad() {
   //tree
tree = new dhtmlXTreeObject("treeboxbox_tree", "100%", "97%", 0);
tree.enableTreeLines(true);
tree.enableCheckBoxes(true);
//tree.setSkin('dhx_skyblue');
tree.setImagePath("<%=basePath %>thirtpart/dhtmlx25/imgs/csh_winstyle/");
tree.enableDragAndDrop(0);
tree.enableTreeLines(true);
tree.enableAutoTooltips(1);
//tree.setImageArrays("plus", "", "", "", "plus.gif");
//tree.setImageArrays("minus", "", "", "", "minus.gif");
//tree.setStdImages("book.gif", "books_open.gif", "books_close.gif");
//tree.setImageArrays("plus", "", "", "", "", "plus.gif");
//tree.setImageArrays("minus", "", "", "", "", "minus.gif");
//tree.setStdImages("book.gif", "folderOpen.gif", "folderClosed.gif");
 
//tree.setOnOpenHandler(tonopen);
//tree.attachEvent("onOpenEnd", function(nodeId, event) {
//    doLog("An id of open item is " + nodeId);
//});
tree.setOnClickHandler(tonclick);
tree.setOnCheckHandler(toncheck);
 
/**tree.attachEvent("onBeforeCheck", function(id,state){
	var userData = tree.getUserData(id,"tagtype"); 
    if("0" == state ){
	    if("" == tagtype){
	    	tagtype = userData;
	    	return true;
	    }else{
	    	if(tagtype != userData){
	    	   alert("检索主题分类共分为四个主题：病名、方剂、证候、中药，同时只能选择一个主题分类！"); 
	    	   return false;
	    	}else{
	    	   return true;
	    	}
	    } 
    } else{
    	return true;
    }
});
*/
//tree.setOnDblClickHandler(tondblclick);

tree.preventIECaching(true);
//tree.enableSmartXMLParsing(true);//false to disable 
tree.enableDistributedParsing(true,20,50);
//tree.enableSmartXMLParsing(true); 

tree.setXMLAutoLoading("<%=basePath %>search/maintree.do");
// tree.loadXML("<%=basePath %>search/subjecttree.do");
tree.loadXML("<%=basePath %>search/maintree.do");	
	
}
doOnLoad(); 
var divH = window.screen.availHeight*0.70;
document.getElementById("treeboxbox_tree").style.height = divH; 
//alert(document.getElementById("treeboxbox_tree").style.height);
//alert(window.screen.availHeight);
//tree.showItemCheckbox(1, false);
 function resetAll(){
 	clearAllSelectedItem();
 }
 function selectAll(){
     var unchecklist = tree.getAllUnchecked(4);
     
     var idarr = unchecklist.split(","); 
     for(var i =0;i<idarr.length;i++){ 
        tree.setCheck(idarr[i],1);
     }
 
 }

loadChncountdata('?dbtype=chn','<%=basePath%>');
loadEngcountdata('?dbtype=eng','<%=basePath%>');
loadOldcountdata('','<%=basePath%>');
loadSummcountdata('','<%=basePath%>');
	</script>

